#define ustandard_perror printf
char* __ustrncpy(char* dest, size_t size_dest, const char* src, size_t size_src)
{
    size_t size = size_dest-1>=size_src?size_src:size_dest-1;
    strncpy(dest, src, size);
    dest[size] = '\0';

    if(size_dest-1 < size_src) {
        ustandard_perror("string length not enough.\n");/* Indicate if dest string length not enough. */
    }

    return dest;
}


char* __ustrncat(char* dest, size_t size_dest, const char* src, size_t size_src)
{
    size_t len = strlen(dest);
    dest += len;
    size_dest -= len;

    __ustrncpy(dest, size_dest, src, size_src);

    return dest;
}


char* __ustrcpy(char* dest, size_t size_dest, const char* src)
{
    size_t size_src = strlen(src);
    __ustrncpy(dest, size_dest, src, size_src);
    return dest;
}


char* __ustrcat(char* dest, size_t size_dest, const char* src)
{
    
    size_t len = strlen(dest);
    dest += len;
    size_dest -= len;

    size_t size_src = strlen(src);
    __ustrncpy(dest, size_dest, src, size_src);

    return dest;
}
